fix: improve business logic in prompt editor and fix cursor bugs in Plan mode#867
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use oxc to improve the quality of JavaScript and TypeScript code reviews.Add a configuration file to your project to customize how CodeRabbit runs oxc. |
…mptEditorHandle`
… prop-controlled updates
a929143 to
fe99740
Compare
|
@macroscope-app review this |
…lan mode (pingdotgg#867) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…lan mode (pingdotgg#867) Co-authored-by: Julius Marminge <julius0216@outlook.com>
* add Ymit24 to vouched list (pingdotgg#959) * fix: fix logo aligment regression on macOS (pingdotgg#960) * fix: Fix response duration for agent to no longer always be 1ms (pingdotgg#866) * fix: diff panel unclosable after retainSearchParams middleware (pingdotgg#937) * fix: improve business logic in prompt editor and fix cursor bugs in Plan mode (pingdotgg#867) Co-authored-by: Julius Marminge <julius0216@outlook.com> * feat: add selective file staging to commit dialog (pingdotgg#872) Co-authored-by: Julius Marminge <julius0216@outlook.com> * fix(web): resolve preferred editor from available editors & introduce `useLocalStorage` helper (pingdotgg#662) Co-authored-by: Julius Marminge <julius0216@outlook.com> * style(web): reformata mockServiceWorker.js com prettier * style(chat): formatar imports no ChatView.logic --------- Co-authored-by: Noah Gregory <noah@wts.dev> Co-authored-by: Jono Kemball <Noojuno@users.noreply.github.com> Co-authored-by: eggfriedrice <eggfriedricew.g.o@gmail.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Guilherme Vieira <46866023+GuilhermeVieiraDev@users.noreply.github.com> Co-authored-by: Magnus Buvarp <magnus.buvarp@gmail.com>
What Changed
This makes four changes all related to the prompt editor (each in their own commit):
onChangedoesn't fire inComposerPromptEditorfor prop-controlled changes (better behavior, I believe)3 and 4 can be seen below. 1 and 2 are business logic changes that should (hopefully) not have any affect on the UI.
I could also add raising answer state to the
composerDraftStorehere, but I feel like that might be scope creep. It's all a bit intertwined, though, so separating them out is difficult.Why
Each change has its own motivations:
onChangehandler.UI Changes
Before
Screen.Recording.2026-03-10.at.19.39.17.mov
After
Screen.Recording.2026-03-10.at.19.40.18.mov
Checklist
Note
[!NOTE]
Fix cursor bugs and prompt sync logic in Plan mode composer
customAnswerinto the composer now tracks the last-syncedrequestIdandquestionId, updating the editor only when the active question/request changes or when the server-provided text differs from the current editor content.isApplyingControlledUpdateRefflag prevents programmatic value/cursor updates from triggeringonChangecallbacks, breaking the feedback loop that caused cursor bugs.Macroscope summarized 621f5f0.